﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class MantenimientoPeriodoBC
    Public Function ListaPeriodo() As DataTable
        Dim ObjLPDA As MantenimientoPeriodoDA
        Dim ObjDt As DataTable

        Try
            ObjLPDA = New MantenimientoPeriodoDA
            ObjDt = ObjLPDA.ListaPeriodo()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    
    Public Function ListaTPeriodo() As DataTable
        Dim objLMPDA As MantenimientoPeriodoDA
        Dim objDt As DataTable

        Try
            objLMPDA = New MantenimientoPeriodoDA
            objDt = objLMPDA.ListaTPeriodo()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try

    End Function
    Public Function ListaMes() As DataTable
        Dim objLMesDA As MantenimientoPeriodoDA
        Dim objDt As DataTable

        Try
            objLMesDA = New MantenimientoPeriodoDA
            objDt = objLMesDA.ListaMes()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try

    End Function
    Public Function ListaAño() As DataTable
        Dim objLADA As MantenimientoPeriodoDA
        Dim objDt As DataTable

        Try
            objLADA = New MantenimientoPeriodoDA
            objDt = objLADA.ListaAño()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try

    End Function

    Public Sub insertarMPeriodo(ByVal PRDO As String, ByVal DESC As String, ByVal ANHIO As String, ByVal MES As String,
                                ByVal TP As String, ByVal EST As String)

        Dim objIMP As MantenimientoPeriodoDA


        Try
            objIMP = New MantenimientoPeriodoDA
            objIMP.insertarMPeriodo(PRDO, DESC, ANHIO, MES, TP, EST)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub editarMPeriodo(ByVal PRDO As String, ByVal DESC As String, ByVal ANHIO As String, ByVal MES As String,
                                ByVal TP As String, ByVal EST As String)

        Dim objEMP As MantenimientoPeriodoDA


        Try
            objEMP = New MantenimientoPeriodoDA
            objEMP.editarMPeriodo(PRDO, DESC, ANHIO, MES, TP, EST)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    
    Public Sub eliminarperiodo(ByVal PRDO As String)
        Dim objEPDA As MantenimientoPeriodoDA

        Try
            objEPDA = New MantenimientoPeriodoDA
            objEPDA.eliminarperiodo(PRDO)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub



    Public Function contarperiodo(ByVal PERIODO As String) As DataTable
        Dim objEPDA As MantenimientoPeriodoDA
        Dim objDt As DataTable
        Try
            objEPDA = New MantenimientoPeriodoDA
            objDt = objEPDA.contarperiodo(PERIODO)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
